/*
Date:20210528 21:56PM
key:只会用笨办法装到vector里面
    数学办法，高位除，低位先除再mod
*/
class Solution {
public:
    bool isPalindrome(int x) 
    {
        if(x<0){return 0;}
        vector<int>v;
        while(x>0)
        {
            v.push_back(x%10);
            x=x/10;
        }
        for(int i=0;i<v.size();i++)
        {
            if(i<=v.size()-1-i)
            {
                if(v[i]!=v[v.size()-1-i])
                {
                    return 0;
                }
            }
            else{break;}
        }
        return 1;
    }
};